import { View } from 'react-native';
import React from 'react';
import PropTypes from 'prop-types';
import Item from '../Item';

const List = ({ navigation, logList, getList }) => (
    <View>
        {
            logList.map(objItem => (
                <Item
                    key={objItem.id}
                    navigation={navigation}
                    getList={getList}
                    objItem={objItem}
                />
            ))
        }
    </View>
);
List.defaultProps = {
    logList: [],
    getList: () => {},
};
List.propTypes = {
    logList: PropTypes.arrayOf(PropTypes.any),
    getList: PropTypes.func,
};
export default List;
